package Objects;

public class State implements CRUDClass {
  private int id;
  private String name;

  public State(int id, String name) {
    this.id = id;
    this.name = name;
  }
  
  public int getId() {
    return this.id;
  }

  public void setId(int id) {
    this.id = id;
  }

  public String getName() {
    return this.name;
  }

  public void setName(String name) {
    this.name = name;
  }
  
  @Override
  public String toInsert() {
    return "INSERT INTO State VALUES (" + this.id + ", '" + this.name + "')";
  }

  @Override
  public String toUpdate() {
    return "UPDATE State SET State_Name = '" + this.name + "' WHERE stateID = " + this.id;
  }

  @Override
  public String toDelete() {
    return "DELETE FROM State WHERE stateID = " + this.id;
  }
}
